package com.fms.model.messaging.auth;

/**
 * An interface designed to hide the authentication mechanisms
 * of the programs by the client code.
 * Some security methods provided
 * @author johnsba1
 *
 */
public interface IAuthentication
{
	/**
	 * Places a request to the authentication mechanisms
	 * for a user name and password
	 * Returns true when user has accepted their entry.
	 * @return
	 */
	boolean request();
	
	/**
	 * Retrieves the username provided by the user
	 * Call request() first!
	 * @return
	 */
	String getUser();
	
	/**
	 * Gets the password provided by the user
	 * Call request() first!
	 * @return
	 */
	char[] getPassword();
	
	/**
	 * A security mechanism that clears the password entered by the user.
	 */
	void purge();
}
